/*
 * @Author: hifishroom
 * @Date: 2021-09-18 10:36:04
 * @LastEditTime: 2021-09-18 15:46:38
 * @FilePath: \jdmall\app.js
 */
// app.js
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync("logs") || [];
    logs.unshift(Date.now());
    wx.setStorageSync("logs", logs);
    // 获取顶部栏信息
    wx.getSystemInfo({
      success: (res) => {
        //导航高度
        this.globalData.navHeight = res.statusBarHeight + 46;
      },
      fail(err) {
        console.log(err);
      },
    });

    // 登录
    wx.login({
      success: (res) => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      },
    });


  },
  globalData: {
    userInfo: null,
    merchandise: {},
  },
});
